﻿package mortal.game.view.LineOffReward
{
    import Framework.Util.*;
    import Message.Game.*;
    import extend.language.*;
    import mortal.common.error.*;
    import mortal.game.cache.*;
    import mortal.game.manager.*;
    import mortal.mvc.core.*;

    public class LineOffRewardProxy extends Proxy
    {

        public function LineOffRewardProxy()
        {
            return;
        }// end function

        public function getAllData() : void
        {
            rmi.iRolePrx.getCompensationInfo_async(new AMI_IRole_getCompensationInfo(null, null));
            return;
        }// end function

        public function getExpReward(param1:int) : void
        {
            rmi.iRolePrx.getOfflineExp_async(new AMI_IRole_getOfflineExp(this.getExpSuccess, this.onFail), param1);
            return;
        }// end function

        private function getExpSuccess(param1:AMI_IRole_getOfflineExp) : void
        {
            MsgManager.showRollTipsMsg("" + Language.getString(71724));
            return;
        }// end function

        public function getCopyOneReward(param1:int, param2:int) : void
        {
            rmi.iRolePrx.getCopyCompensation_async(new AMI_IRole_getCopyCompensation(this.getCopyOneSuccess, this.onFail), param1, param2);
            return;
        }// end function

        private function getCopyOneSuccess(param1:AMI_IRole_getCopyCompensation) : void
        {
            MsgManager.showRollTipsMsg("" + Language.getString(71725));
            return;
        }// end function

        public function oneKeyGetCopyReward(param1:int) : void
        {
            rmi.iRolePrx.getCopyCompensation_async(new AMI_IRole_getCopyCompensation(this.oneKeyGetCopySuccess, this.onFail), 0, param1);
            return;
        }// end function

        private function oneKeyGetCopySuccess(param1:AMI_IRole_getCopyCompensation) : void
        {
            MsgManager.showRollTipsMsg("" + Language.getString(71726));
            return;
        }// end function

        private function onFail(param1:Exception) : void
        {
            MsgManager.showRollTipsMsg(ErrorCode.getErrorStringByCode(param1.code));
            Cache.instance.lineOff.isOneKeyGet = false;
            return;
        }// end function

    }
}
